package com.cy.cuiyang_admin.rabbitmp;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * @author cuiyang
 * @title: HelloReceiver
 * @projectName cuiyang
 * @description: TODO
 * @date 2020/12/2711:13
 */
@Component
public class HelloReceiver {

    private static final Logger log = LoggerFactory.getLogger(HelloReceiver.class);

    /**
     * 监听器监听指定的Queuex
     * @param hello
     */
    @RabbitListener(queues="hello")
    public void process(String hello){
        log.info("Receiver:"+hello);
    }

}
